package com.totem.base.enums;

import lombok.Getter;

@Getter
public enum FileTypeEnum {
    COVER("COVER"),
    CAROUSEL("CAROUSEL"),
    VIDEO("VIDEO");

    private final String code;

    FileTypeEnum(String code){
        this.code = code;
    }

    public static FileTypeEnum byCode(String code) {
        for (FileTypeEnum e: FileTypeEnum.values()) {
            if (e.code.equalsIgnoreCase(code)) {
                return e;
            }
        }
        return null;
    }
}
